package com.kx.yooli.kx.wechat.base.page;

import com.google.common.base.Supplier;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;

import java.io.Serializable;
import java.util.Date;
import java.util.Optional;

/**
 * @author john_sqwen
 * @date 2024/3/23
 * @PROJECT_NAME wechat
 * @description create BasePageEntity by john_sqwen
 * and  value is
 */
public class BasePageEntity implements Serializable {
    @Id(keyType = KeyType.Auto)
    private Long id;
    @Column(onInsertValue = "now()")
    private Date create;
    @Column(onUpdateValue = "now()")
    private Date modifyDate;
    @Column(onUpdateValue = "now()")
    private Date updateDate;
    private String createUser;
    private String updateUser;

    public BasePageEntity() {
    }

    public BasePageEntity(Long id, Date create, Date modifyDate, Date updateDate, String createUser, String updateUser) {
        this.id = id;
        this.create = create;
        this.modifyDate = modifyDate;
        this.updateDate = updateDate;
        this.createUser = createUser;
        this.updateUser = updateUser;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreate() {
        return create;
    }

    public void setCreate(Date create) {
        this.create = create;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Override
    public String toString() {
        return "BasePageEntity{" +
                "id=" + id +
                ", create=" + create +
                ", modifyDate=" + modifyDate +
                ", updateDate=" + updateDate +
                ", createUser='" + createUser + '\'' +
                ", updateUser='" + updateUser + '\'' +
                '}';
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        return super.equals(obj);
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
